package com.springBoot.springBootSysCore.modules.controller.web.base;

import java.util.Map;
import java.util.Map.Entry;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
/**
 * 页面跳转
 * @author Administrator
 *
 */
@Controller
@RequestMapping("${adminPath}/pageSkip")
public class PageSkip {

	@RequestMapping(value="jumpPage",method=RequestMethod.GET)
	public ModelAndView jumpPage(HttpServletRequest request,@RequestParam(value="pageUrl",required=true)String pageUrl) throws Exception{
		ModelAndView mv = new ModelAndView(pageUrl);
		Map<String, String[]> paramMap = request.getParameterMap();
		for (Entry<String, String[]> entry : paramMap.entrySet()) {
			mv.addObject(entry.getKey(), (entry.getValue())[0]);
		}
		return mv;
	}

}
